package com.winsdom.dto.expenditure;

import com.winsdom.entity.Expenditure;
import com.winsdom.entity.FeeFormula;
import com.winsdom.entity.Formula;
import lombok.Data;

import javax.validation.Valid;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.List;

@Data
public class ExpenditureUpsertDTO {
    @Valid // 添加此注解使嵌套对象校验生效
    private Expenditure expenditure;
    @NotEmpty(message = "公式不能为空")
    private List<Formula> formulas;
    @NotEmpty(message = "价格不能为空")
    private List<BigDecimal> prices;
}
